Skip to content

Conversation

@schtibe
Copy link
Contributor

@schtibe schtibe commented Aug 22, 2025

I was recommended by a friend to use ruff and uv as replacement for yapf and pipenv respectively. These tools seem to be the latest and greatest for python linting/formatting/environment handling.

Since I don't have enough context to work on the tickets in the backlog and PWIP is currently frozen, I finally had the opportunity to check these out.

So the case of uv is that it's a replacement for all things pip and virtualenv related. And it's blazingly fast. It seems to be the pnpm cousin for python, including shared package storage and workspace management. And most of all, it can handle the installation of the required python version (no dependency on the system's python installation) *

Ruff on the other hand seems to be a good (and also very fast) tool to lint and format the code. I didn't look too much into that, it's only worth noting that when using it we'd have to either accept a slightly different code formatting or try to adjust the rules. Personally, I don't care much about the formatting if it's done automatically for me by a tool, and I tend to follow the community guidelines.

What do you think, should we start adopting to this?
I'm not entirely done here, but so far it looks good in my opinion.

* A good use case for this could also be if we want to use pypy instead of cypthon. I toyed with that idea a bit recently, with the idea to gain a bit of free performance in service-stac...

@schtibe schtibe force-pushed the feat-checkout-uv-and-ruff branch 4 times, most recently from 5ec3d12 to faf27bc Compare August 22, 2025 15:11
Throw out pipenv, yapf and all that to be replaced by the more powerful
tools uv and ruff
@schtibe schtibe force-pushed the feat-checkout-uv-and-ruff branch from faf27bc to 0c739a4 Compare August 22, 2025 15:14
The formatting will be done in another step, but I want to see if the CI
runs through
@schtibe schtibe changed the title Feat checkout uv and ruff [RFC]Feat checkout uv and ruff Aug 22, 2025
@schtibe schtibe changed the title [RFC]Feat checkout uv and ruff [RFC] Checkout uv and ruff Aug 22, 2025
@schtibe schtibe marked this pull request as draft August 22, 2025 15:57
@schtibe schtibe requested review from benschs, boecklic and msom August 22, 2025 16:01
@msom
Copy link
Contributor

msom commented Aug 25, 2025

I've had good experience with uv especially in terms of speed, from ruff I heard similar. Two considerations:

  • we might want to keep the same toolchain over all our projects to make things easier
  • uv/ruff is from astral, a private company

@msom msom requested a review from ltshb August 25, 2025 06:11
Copy link

@ltshb ltshb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have nothing about new stuff, however if we want to keep the same toolchain all over the places, then it will requires some effort. I think we need for this good argument. But to me we could also use it only for new repository if it adds really a plus value.

@@ -1,11 +1,11 @@
from .settings_base import * # pylint: disable=wildcard-import, unused-wildcard-import
from .settings_base import * # noqa: F403
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like the noqa: F403 is there no way to disable using some wording instead of ID, that something I like in pylint, it make much more clearer what is disabled

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose it could be written in the comment afterwards.

@schtibe
Copy link
Contributor Author

schtibe commented Aug 25, 2025

I have nothing about new stuff, however if we want to keep the same toolchain all over the places, then it will requires some effort. I think we need for this good argument. But to me we could also use it only for new repository if it adds really a plus value.

@ltshb @msom Yes I 100% agree that it should be the same everywhere. I wanted to try it out here as here it's less disruptive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants